//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { VueEditorPages, VueEditorPagesResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooVueEditorPagesList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<VueEditorPagesResponse>(`/uctoo/vue_editor_pages/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooVueEditorPages = async (id: string) => {
  return requestClient.get<VueEditorPages>(`/uctoo/vue_editor_pages/${id}`);
};

export const adductooVueEditorPages = async (data: Partial<VueEditorPages>) => {
  return requestClient.post<VueEditorPages>('/uctoo/vue_editor_pages/add', data);
};

export const edituctooVueEditorPages = async (data: Partial<VueEditorPages>) => {
  return requestClient.post<VueEditorPages>('/uctoo/vue_editor_pages/edit', data);
};

export const deleteuctooVueEditorPages = async (id: string) => {
  return requestClient.post<any>('/uctoo/vue_editor_pages/del', { id });
};
